package com.example.android.sunshine.app.data;

import android.provider.BaseColumns;

/**
 * Created by BZSPW4 on 01/09/2014.
 */
public class WeatherContract {
    // Inner class that defines the table contents of the location table
    public static final class LocationEntry implements BaseColumns {
        // Table name
        public static final String TABLE_NAME = "location";
        // The Postal Code is what will be sent to the server as the location query
        public static final String COLUMN_POSTAL_CODE = "postal_code";
        // Human readable location string, provided by the API. Because for styling,
        // "Mountain View" is more recognizable that 94043
        public static final String COLUMN_LOCATION_NAME = "location_name";
        public static final String COLUMN_LOCATION_SETTING = "location";
        public static final String COLUMN_CITY_NAME = "city";
        public static final String COLUMN_COORD_LAT = "latitud";
        public static final String COLUMN_COORD_LONG = "longitud";
    }

    // Inner class that defines the table contents of the weather table
    public static final class WeatherEntry implements BaseColumns {

        // Table name
        public static final String TABLE_NAME = "weather";
        // Column with the foreign key into the location table.
        public static final String COLUMN_LOC_KEY = "location_id";
        // Date, stored as Text with format yyyy-MM-dd
        public static final String COLUMN_DATETEXT = "date";
        // Weather id as returned by API, to indentify the icon to be used
        public static final String COLUMN_WEATHER_ID = "weather_id";

        // Short description and long description of the weather, as provided by API.
        // e.g "clear" vs "sky is clear"
        public static final String COLUMN_SHORT_DESC = "short_desc";

        // Min and max temperatures for the day (stored as floats)
        public static final String COLUMN_MIN_TEMP = "min";
        public static final String COLUMN_MAX_TEMP = "max";

        // Humidity is stored as float representing percentage
        public static final String COLUMN_HUMIDITY = "humidity";

        public static final String COLUMN_PRESSURE = "pressure";
        public static final String COLUMN_WIND_SPEED = "wind";
        public static final String COLUMN_DEGREES = "degrees";
    }
}
